package com.itggm.mapper;

import com.itggm.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select * from sys_user where username = #{username}")
    User selectUserByUserName(String username);

    void editPersonalInfo(User user);
    @Update("update sys_user set password = #{newDBPassword} where id = #{id}")
    void editPersonalPwd(@Param("id") Integer id, @Param("newDBPassword") String newDBPassword);

    List<User> userPage(String nickname);

    void addUser(User user);


    void delete(Integer id);

    void editUser(User user);

    void resetPwd(@Param("id") Integer id, @Param("newDBPassword") String newDBPassword);
}
